<?php
namespace app\common\task\validate;

use think\Validate;

class DeviceValidate extends Validate
{
    protected $rule = [
        'id'    => 'require|gt:0',
        'title' => 'require',
        'uuid ' => 'require',
    ];

    protected $message = [
        'id.require' => '参数错误',
        'id.gt' => '参数错误',
        'title.require' => '设备名称不能为空',
        'uuid.require' => 'UUID不能为空',
    ];

    protected $scene = [
        'create'    => ['title', 'uuid'],
        'edit'      => ['id', 'title', 'uuid'],
        'delete'    => ['id']
    ];
}